<?php

use Faker\Generator as Faker;

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/

$factory->define(App\User::class, function (Faker $faker) {
    static $password;

    return [
        'account' => '17310320' . rand(100, 999),
        'user_name' => $faker->name,
<<<<<<< HEAD
        'password' => $password ?: $password = bcrypt('666666'),
=======
        'password' => $password ?: $password = encrypt('666666'),
>>>>>>> 3cbfde5c21633bb47be419577bca65cd8c0581b5
        'status' => rand(-1, 0),
        'remember_token' => str_random(10)
    ];
});
